﻿/********************************************************************************************************************
* Author:	Aris Michail																							*
* Email:	std03055@di.uoa.gr																						*
* Purpose:	This script is used in order to create the stored procedure "usp_getPendingEntities" that returns the	*
*			entities of a category that are not yet approved.														*
********************************************************************************************************************/

CREATE PROCEDURE [dbo].[usp_getPendingEntities]
	@catid bigint
AS
	SELECT *
	FROM Entities
	WHERE Entities.Category = @catid and Entities.IsApproved = '0'
RETURN 0